<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTableMember extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ce_member', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('number', 50)->comment('账号');
            $table->string('password', 255)->comment('密码');
            $table->integer('boolean')->default(0)->comment('余额：单位分');
            $table->string('avatar_url', 500)->default(null)->comment('微信头像')->nullable();
            $table->integer('gender')->default(0)->comment('性别:0未设置，1男，2女');
            $table->string('nick_name', 100)->default(null)->comment('昵称')->nullable();
            $table->string('openid', 100)->default(null)->comment('openid')->nullable();
            $table->bigInteger('auth_time')->default(0)->comment('授权时间');
            $table->string('invitation_code')->default(null)->comment('邀请码');
            $table->bigInteger('invitation_uid')->default(0)->comment('邀请人id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('table_member');
    }
}
